﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WxApp.Helper;

namespace WxApp.Controllers
{
    [Produces("text/html")]
    [Route("api/wechat")]
    public class WeChatController : Controller
    {
        [HttpGet("oauth2callback")]
        public string Get(string code, string state)
        {
            return WeChatHelper.GetOpenID(code);
        }
    }
}